# Contributor: Matthias Neugebauer <mtneug@mailbox.org>
# Maintainer: Matthias Neugebauer <mtneug@mailbox.org>
pkgname=go-bindata-assetfs
pkgver=1.0.1
pkgrel=0
pkgdesc="A small utility which generates Go code to serve any file with net/http"
url="https://github.com/elazarl/go-bindata-assetfs"
arch="all !mips !mips64" # blocked by go
license="BSD-2-Clause"
depends="go-bindata"
makedepends="go"
options="!check" # no test suite
source="$pkgname-$pkgver.tar.gz::https://github.com/elazarl/go-bindata-assetfs/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/elazarl/$pkgname"

prepare() {
	default_prepare
	mkdir -p "$srcdir/src/github.com/elazarl"
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
}

build() {
	GOPATH="$srcdir" CGO_ENABLED=0 go build -v -o bin/$pkgname ./go-bindata-assetfs
}

package() {
	install -Dm 755 "$builddir/bin/$pkgname" \
		"$pkgdir/usr/bin/$pkgname"
}

sha512sums="fde5cd06393c82a8a1f9da5cc3054c1cc389328b5a232c5595a32755b2d613a83dc7777070152ad31ccbbbfbcf2419ad44bef89f88ceef4c6b7e5df8715309cf  go-bindata-assetfs-1.0.1.tar.gz"
